using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
namespace WebApplication1
{
    public partial class KYCField : System.Web.UI.UserControl
    {
        int kycSetAttributeID = 0;
        String name = String.Empty;
        String cssClass = String.Empty;
        String id = String.Empty;
        bool isRequire = false;
        String requireMessage = String.Empty;

        bool IsTextBox = false;

        String seletedValue = String.Empty;
        List<ListItem> listItemArray = new List<ListItem>();

        public KYCField(int _kycSetAttributeID)
        {
            kycSetAttributeID = _kycSetAttributeID;
            // Load Attribute info and Set to class
            if (_kycSetAttributeID == 12)
            {
                cssClass = "InputBox";
                name = "Address";
                id = "addressTextBox";
                IsTextBox = true;
            }

            if (_kycSetAttributeID == 11)
            {
                cssClass = "InputBox";
                name = "Email";
                id = "emailTextBox";
                IsTextBox = true;
            }
        }

        public KYCField()
        {
        }

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            if (IsTextBox)
            {
                UserControl uc1 = (UserControl)Page.LoadControl("KYCTextBox.ascx");
                ((KYCTextBox)uc1).CssClass = cssClass;
                ((KYCTextBox)uc1).ControlID = id;
                ((KYCTextBox)uc1).Name = name;
                ((KYCTextBox)uc1).IsRequire = isRequire;
                ((KYCTextBox)uc1).RequireMessage = requireMessage;
                this.Controls.Add(uc1);
            }
        }

        public int KYCSetAttributeID
        {
            get { return kycSetAttributeID; }
            set { kycSetAttributeID = value; }
        }

        public String SeletedValue
        {
            get { return seletedValue; }
            set { seletedValue = value; }
        }

        public List<ListItem> ListItemArray
        {
            get { return listItemArray; }
            set { listItemArray = value; }
        }

        public String Name
        {
            get { return name; }
            set { name = value; }
        }

        public String ControlID
        {
            get { return id; }
            set { id = value; }
        }

        public String CssClass
        {
            get { return cssClass; }
            set { cssClass = value; }
        }

        public String RequireMessage
        {
            get { return requireMessage; }
            set { requireMessage = value; }
        }

        public bool IsRequire
        {
            get { return isRequire; }
            set { isRequire = value; }
        }

        

        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}